package com.orhon.smartcampus.modules.course.mm;

import com.orhon.smartcampus.modules.base.mm.DictionaryMapper;
import com.orhon.smartcampus.modules.base.mm.LangMapper;
import com.orhon.smartcampus.modules.course.entity.Courses;
import com.orhon.smartcampus.modules.course.gqlModel.GQLCourses;
import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Named;
import org.mapstruct.factory.Mappers;

import java.util.ArrayList;
import java.util.List;

@Mapper(
		uses = {
				LangMapper.class
		}
		)
public interface CoursesMapper{



	CoursesMapper MAPPER = Mappers.getMapper(CoursesMapper.class);

	@Mapping(ignore = true, target = "subject")
	@Mapping(ignore = true, target = "school" )
	@Mapping(ignore = true, target = "courseKindDict" )
	@Mapping(ignore = true, target = "level" )
	GQLCourses toCourses(Courses entity);

	@InheritConfiguration(name = "toCourses")
	List<GQLCourses> toCoursesList(List<Courses> entitys);

}
